using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace MWC.BL
{
    [Serializable]
    public class Meeting : ISerializable
    {
        public DateTime time;
        public string title;
        public string link;
        public string address;
        public double latitude;
        public double longitude;
        
        public Meeting() { }
        public Meeting(DateTime setTime, string setTitle, string setLink, string setAddress, double setLatitude, double setLongitude)
        {
            time = setTime;
            title = setTitle;
            link = setLink;
            address = setAddress;
            latitude = setLatitude;
            longitude = setLongitude;
        }
        protected Meeting(SerializationInfo info, StreamingContext context)
        {
            link = info.GetString("link");
            title = info.GetString("title");
            time = info.GetDateTime("time");
            address = info.GetString("address");
            latitude = info.GetDouble("latitude");
            longitude = info.GetDouble("longitude");
        }
        public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("link", link);
            info.AddValue("title", title);
            info.AddValue("time", time);
            info.AddValue("address", address);
            info.AddValue("latitude", latitude);
            info.AddValue("longitude", longitude);
        }
    }
}